import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from "axios";
import vueAxios from 'vue-axios'
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import './assets/css/comm.css'
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'


axios.defaults.withCredentials=true;
axios.defaults.baseURL='http://localhost:8081/'

//拦截器
axios.interceptors.request.use(config=>{
  config.headers.Authorization=sessionStorage.getItem('token')
  return config;
})

createApp(App).use(store).use(router).use(ElementPlus, { locale }).use(vueAxios,axios).mount('#app')

